<template>
  <div class="header-nav">
    <div class="header-item">
      <div class="title-panel">今日新增用户数</div>
      <div class="number-panel">
        <p class="font-32 font-bold" style="color: #409EFF">{{ statisticsData.today_user }}</p>
      </div>
      <div class="ear-panel">
        <p class="font-color font-14">新增用户的充值金额：￥{{ statisticsData.today_recharge_amount }}</p>
        <p class="font-color font-14 mt-10">新增用户的充值人数：{{ statisticsData.today_recharge_num }}</p>
      </div>
    </div>
    <div class="header-item">
      <div class="title-panel">昨日新增用户数</div>
      <div class="number-panel">
        <p class="font-32 font-bold" style="color: #409EFF">{{ statisticsData.yesterday_user }}</p>
      </div>
      <div class="ear-panel">
        <p class="font-color font-14">新增用户的充值金额：￥{{ statisticsData.yesterday_recharge_amount }}</p>
        <p class="font-color font-14 mt-10">新增用户的充值人数：{{ statisticsData.yesterday_recharge_num }}</p>
      </div>
    </div>
    <div class="header-item">
      <div class="title-panel">本月新增用户数</div>
      <div class="number-panel">
        <p class="font-32 font-bold" style="color: #409EFF">{{ statisticsData.month_user }}</p>
      </div>
      <div class="ear-panel">
        <p class="font-color font-14">新增用户的充值金额：￥{{ statisticsData.month_recharge_amount }}</p>
        <p class="font-color font-14 mt-10">新增用户的充值人数：{{ statisticsData.month_recharge_num }}</p>
      </div>
    </div>
    <div class="header-item">
      <div class="title-panel">累计注册用户数</div>
      <div class="number-panel">
        <p class="font-32 font-bold" style="color: #409EFF">{{ statisticsData.user }}</p>
      </div>
      <div class="ear-panel">
        <p class="font-color font-14">累计用户的充值金额：￥{{ statisticsData.recharge_amount }}</p>
        <p class="font-color font-14 mt-10">累计用户的充值人数：{{ statisticsData.recharge_num }}</p>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: 'CountKing',
  props: {
    statisticsData: {
      type: Object
    }
  }
}
</script>

<style lang="scss" scoped>

.header-nav {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
}
.header-item {
  border: 1px solid #ddd;
  width: 24%;
  .title-panel {
    background-color: #f8f8f9;
    color: #333333;
    font-size: 18px;
    padding: 15px;
    font-weight: bold;
  }
  .number-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 0 15px 10px;
    width: 100%;
    height: 77px;
  }
  .ear-panel {
    padding-left: 15px;
    padding-bottom: 15px;
    margin-top: 30px;
  }
}

@media (max-width: 768px) {
  .header-item {
    margin-top: 20px;
    border: 1px solid #ddd;
    width: 100%;
    .spacing {
      margin-right: 20px;
    }
  }
  .header-item:first-child {
    margin-top: 0;
    width: 100%;
  }
}
</style>
